#ifndef WISHMASTERAPPLICATION_H
#define WISHMASTERAPPLICATION_H

#include <QApplication>
#include <QTranslator>
#include "misc.h"
#include "ui/mainwindow.h"
#include "chanmanager.h"
#include "chanagents/agentfactory.h"

namespace Wishmaster
{
	class WISHMASTER_EXPORT WishmasterApplication : public QApplication
	{
	public:
		WishmasterApplication(int& argc, char** argv);
		virtual ~WishmasterApplication();

        bool initialize();

	protected:
		void initLogging();
		void parseArgs(int argc, char** argv);
		void registerMetatypes();
		void initSingletons();
		void setIcon();
		void installTranslator();
		bool createAndShowMainWindow();
		void initChanManager();

	private:
		QTranslator m_translator;
		MainWindow* m_mainWindow;
		ChanManager* m_chanmanager;
		AgentFactory* m_agentFactory;

		int m_argc;
		char** m_argv;
	};
}

#endif // WISHMASTERAPPLICATION_H
